﻿using System.Collections.Generic;

namespace Bilibili.Model.Follow
{
    public sealed class FollowSeasonInfo
    {
        public int _Status { get; set; }
        public string Badge { get; set; }
        public bool Show_Badge => !string.IsNullOrEmpty(Badge);
        public int Badge_Type { get; set; }
        private string _Cover;
        public string Cover
        {
            get { return _Cover + "@300w.jpg"; }
            set { _Cover = value; }
        }
        public int Is_Finish { get; set; }
        public string Title { get; set; }
        public int Season_Id { get; set; }
        public int Season_Type { get; set; }
        public string Season_Type_Name { get; set; }
        public string Url { get; set; }
        public FollowSeasonNewEp New_Ep { get; set; }
        public string NewEp => New_Ep?.index_show;
        public FollowSeasonProgress Progress { get; set; }
        public string ProgressStr => Progress?.index_show;
        public List<FollowSeasonAreas> Areas { get; set; }
        public bool Show_Areas => Areas != null && Areas.Count != 0;
        public string AreasStr
        {
            get
            {
                var str = Season_Type_Name;
                if (Areas != null && Areas.Count != 0)
                {
                    str += " | ";
                    foreach (var item in Areas)
                        str += item.name + "、";
                    str = str.TrimEnd('、');
                }
                return str;
            }
        }
    }
}